<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                template="/templates/templateLogin.xhtml"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://xmlns.jcp.org/jsf/core">
    <ui:define name="head">
        <title>Facelet Title</title>
    </ui:define>
    <ui:define name="body">
        <div align="center">
            <h:form id="frmLogin">
                <p:messages autoUpdate="true" showDetail="true"/>
                <!--<p:growl id="frmlLoginConfirm" />-->
                <p:panelGrid id="panel" columns="2">
                    <f:facet name="header">#{msg["login.title"]}</f:facet>
                    <p:outputLabel for="txtNameUser" value="#{msg['login.user']}" />
                    <p:inputText id="txtNameUser" value="#{loginController.nameUser}" required="true"/>
                    <p:outputLabel for="txtPassword" value="#{msg['login.password']}" />
                    <p:password id="txtPassword" value="#{loginController.password}" required="true"/>
                </p:panelGrid>
                <p:commandButton value="#{msg['login.button.login']}" action="#{loginController.login()}" 
                                 process="@form" update="frmLogin"/>
                <p:commandButton value="#{msg['button.changeLanguage']}" action="#{loginController.changeLanguage()}" ajax="false" immediate="true"/>
                <br/>
            </h:form>
        </div>
    </ui:define>
</ui:composition>

